package com.zhao.fishingguideserver.POJO;

import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.Pattern;
import lombok.Data;
import net.minidev.json.annotate.JsonIgnore;
import java.time.LocalDateTime;

@Data
public class User {
    private Long user_id;

    @NotEmpty
    @Pattern(regexp = "^.{5,16}$", message = "用户名长度必须在5-16位之间")
    private String username;

    @JsonIgnore
    @Pattern(regexp = "^.{5,16}$", message = "密码长度必须在5-16位之间")
    private String password;

    private LocalDateTime createdAt;

    private String nickName;
    
    // 用户角色：user-普通用户, admin-管理员
    private String role;
    
    // 用户状态：1-正常, 0-禁用
    private Integer status;
    
    // 最后登录时间
    private LocalDateTime lastLoginTime;
}
